/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment.Qusetion1.payableInterface;

import za.ac.cput.assignment.Qusetion1.salaried.SalariedEmployee;
import za.ac.cput.assignment.Qusetion1.payable.Payable;
import za.ac.cput.assignment.Qusetion1.invoice.Invoice;

/**
 *
 * @author Andisiwe
 */
public class PayableInterfaceTest 
{
    public static void main( String[] args)
    {
        Payable[] payableObjects = new Payable[4];
        payableObjects[0]= new Invoice ("02134"," seat", 2,375.00);
        payableObjects[1] = new Invoice ("56789","tire",4,79.95);
        payableObjects[2] = new SalariedEmployee("John","Simth","111-11-1111",800.00);
        
        payableObjects[3]= new SalariedEmployee("lisa","Barnes","888-88-8888",1200.00);
        
        System.out.println(
                "invoive and Employees processed polymorphically:\n");
        for(Payable currentPayable: payableObjects)
        {
            System.out.printf("%s \n%s: $%,.2f\n\n",
                    currentPayable. toString(),"payment due",currentPayable.getPaymentAmount());
        }
        }
        
    }
